<?php echo $header; ?>
<div id="content">
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <?php if (isset($error_warning)) { ?>
  <div class="warning"><?php echo $error_warning; ?></div>
  <?php } ?>
  <div class="box">
    <div class="heading">
      <h1><img src="view/image/module.png" alt="" /> <?php echo $_['module_name']; ?></h1>
      <div class="buttons"><a onclick="$('#form').submit();" class="button"><?php echo $_['button_save']; ?></a><a href="<?php echo UA('extension/module'); ?>" class="button"><?php echo $_['button_cancel']; ?></a></div>
    </div>
    <div class="content">
      <form action="<?php echo UA('module/social_login'); ?>" method="post" enctype="multipart/form-data" id="form">
		<table class="form">
			<tr>
			  <td><?php echo $_['entry_mode']?></td>
			  <td>
			  <select name="social_login_module[0][window_mode]">
				<?php echo form_select_option($_['option_mode'], $modules[0]['window_mode'], true); ?>
			  </select>
			  </td>
			</tr>
			<tr>
			  <td><?php echo $_['entry_layout']; ?></td>
			  <td>
			  <select name="social_login_module[0][layout_id]">
			    <option value="0"><?php echo $_['text_layout_all']?></option>
				<?php echo form_select_option($layouts, $modules[0]['layout_id'], null, 'layout_id', 'name'); ?>
			  </select>
			  </td>
			</tr>
			<tr>
			  <td><?php echo $_['entry_position']; ?></td>
			  <td><select name="social_login_module[0][position]">
                 <?php echo form_select_option($_['option_position'], $modules[0]['position'], true); ?>
                </select></td>
			</tr>
			<tr>
              <td><?php echo $_['entry_status']; ?></td>
              <td><select name="social_login_module[0][status]">
                 <?php echo form_select_option($_['option_statuses'], $modules[0]['status'], true);?>
                </select></td>
            </tr>
            <tr>
              <td><?php echo $_['entry_sort_order']?></td>
              <td><input type="text" name="social_login_module[0][sort_order]" value="<?php echo $modules[0]['sort_order']; ?>" /></td>
            </tr>
		</table>
		<div class="vtabs">
          <a href="#tab-module-fb" id="module-fb">FaceBook</a>
          <a href="#tab-module-gg" id="module-gg">Google</a>
		</div>
        <div id="tab-module-fb" class="vtabs-content">
          <table class="form">
			 <tr><td><span class="required">*</span> API Key:</td>
				  <td><input type="text" name="social_login_module[0][Facebook_client_id]" value="<?php echo $modules[0]['Facebook_client_id']; ?>" size="45" /></td>
			 </tr>
            <tr>
              <td><span class="required">*</span> API Secret:</td>
              <td><input type="text" name="social_login_module[0][Facebook_client_secret]" value="<?php echo $modules[0]['Facebook_client_secret']; ?>" size="45" /></td>
            </tr>
			<tr>
              <td><?php echo $_['entry_status']; ?></td>
              <td><select name="social_login_module[0][Facebook_oauth_status]">
                 <?php echo form_select_option($_['option_statuses'], $modules[0]['Facebook_oauth_status'], true);?>
                </select></td>
            </tr>
          </table>
        </div>
        <div id="tab-module-gg" class="vtabs-content">
          <table class="form">
			 <tr><td><span class="required">*</span> Client ID:</td>
				  <td><input type="text" name="social_login_module[0][Google_client_id]" value="<?php echo $modules[0]['Google_client_id']; ?>" size="45" /></td>
			 </tr>
            <tr>
              <td><span class="required">*</span> Client Secret:</td>
              <td><input type="text" name="social_login_module[0][Google_client_secret]" value="<?php echo $modules[0]['Google_client_secret']; ?>" size="45" /></td>
            </tr>
			<tr>
              <td><?php echo $_['entry_status']; ?></td>
              <td><select name="social_login_module[0][Google_oauth_status]">
                 <?php echo form_select_option($_['option_statuses'], $modules[0]['Google_oauth_status'], true);?>
                </select></td>
            </tr>
          </table>
        </div>
      </form>
    </div>
  </div>
</div>
<script type="text/javascript"><!--
$('.vtabs a').tabs();
//--></script> 
<?php echo $footer; ?>